<?php

    require("functions.php");
    
    function insertHome($dbname, $dbhandle)
    {
        $lat = $_POST["lat"];
        $lng = $_POST["lng"];
        
        
        
        //if(empty ($_POST["symbol"] ))
        $sql = "insert into houses (name, lat, lng) values ('Home' ,"
        . $lat
        .","
        . $lng
        .")";
        
        //echo("Before Inserthome.php " .$sql );
        
        mysql_select_db($dbname);
        
        $retval = mysql_query( $sql, $dbhandle );
        if(! $retval )
        {
          die('Could not enter data: ' . mysql_error());
		  //this is a test for svn history
        }
        //echo("Inside Inserthome.php");
        
    }
    
    insertHome($dbname, $dbhandle);
    closeConnection($dbhandle);
?>